<template>
  <div class="station-overview">
    <el-row class="row" :gutter="10">
      <el-col :span="8" class="col">
        <div @click="handleOpenPetitionDialog(21,'行政单位')" class="number-item">
          <div class="value-block">
            <div class="value">{{PARTY_AND_GOVERNMENT_ORGANS.length}}</div>
            <div class="unit">个</div>
          </div>
          <div class="text">行政单位</div>
        </div>
      </el-col>
      <el-col :span="8" class="col">
        <div @click="handleOpenPetitionDialog(23,'国企')" class="number-item">
          <div class="value-block">
            <div class="value">{{OWNED_ENTERPRISE_UNIT.length}}</div>
            <div class="unit">个</div>
          </div>
          <div class="text">国企</div>
        </div>
      </el-col>
    </el-row>
    <el-row class="row" :gutter="0">
      <el-col :span="8" class="col">
        <div class="number-item">
          <div class="value-block">
            <div class="value" style="color:#FED52F;">一个核心</div>
          </div>
          <div class="text">市委、市政府</div>
        </div>
      </el-col>
    </el-row>
    <el-row class="row" :gutter="10">
      <el-col  style="position: relative;top: -65px" :span="8" class="col">
        <div @click="handleOpenPetitionDialog(20,'行业场所')" class="number-item">
          <div class="value-block">
            <div class="value">{{INDUSTRY_SITES.length}}</div>
            <div class="unit">个</div>
          </div>
          <div class="text">行业场所</div>
        </div>
      </el-col>
      <el-col :span="8" class="col">
        <div @click="handleOpenPetitionDialog(22,'学校')" class="number-item">
          <div class="value-block">
            <div class="value">{{SCHOOL_DATA.length}}</div>
            <div class="unit">所</div>
          </div>
          <div class="text">学校</div>
        </div>
      </el-col>
      <el-col style="position: relative;top: -65px" :span="8" class="col">
        <div class="number-item">
          <div class="value-block">
            <div class="value">5</div>
            <div class="unit">所</div>
          </div>
          <div class="text">医院</div>
        </div>
      </el-col>
    </el-row>
    <div class="icon-number-block">
      <div class="icon-number-item">
        <img src="@/assets/images/home-number-icon-1.png" class="icon">
        <div class="text-block">
          <div class="text">户籍人口</div>
          <div class="value-block">
            <div class="value">3,434</div>
            <div class="unit">人</div>
          </div>
        </div>
      </div>
      <div class="icon-number-item">
        <img src="@/assets/images/home-number-icon-2.png" class="icon">
        <div class="text-block">
          <div class="text">常住人口</div>
          <div class="value-block">
            <div class="value">4,514</div>
            <div class="unit">人</div>
          </div>
        </div>
      </div>
      <div class="icon-number-item">
        <img src="@/assets/images/home-number-icon-3.png" class="icon">
        <div class="text-block">
          <div class="text">暂住人口</div>
          <div class="value-block">
            <div class="value">1,080</div>
            <div class="unit">人</div>
          </div>
        </div>
      </div>
    </div>
    <div class="background-number-block">
      <div @click="handleOpenPetitionDialog(1,'全市重点信访人员')" class="background-number-item">
        <div class="value-block">
          <div class="value">{{QS_KEY_PERSONNEL_OF_GUANGXIA_POLICE.length}}</div>
          <div class="unit">人</div>
        </div>
        <div class="text">全市重点信访人员</div>
      </div>
      <div @click="handleOpenPetitionDialog(2,'肃州区重点信访人员')" class="background-number-item">
        <div class="value-block">
          <div class="value">{{SZQ_KEY_PERSONNEL_OF_LETTERS_AND_VISITS.length}}</div>
          <div class="unit">人</div>
        </div>
        <div class="text">肃州区重点信访人员</div>
      </div>
      <div class="background-number-item" @click="handleOpenPetitionDialog(3,'重中之重信访人员')" > 
        <div class="value-block">
          <div class="value">{{SZQ_KEY_PETITIONERS.length}}</div>
          <div class="unit">人</div>
        </div>
        <div class="text">重中之重信访人员</div>
      </div>
      <div @click="handleOpenPetitionDialog(4,'广厦警务区重点人员')" class="background-number-item">
        <div class="value-block">
          <div class="value">{{SZQ_KEY_PERSONNEL_OF_GUANGXIA_POLICE.length}}</div>
          <div class="unit">人</div>
        </div>
        <div class="text">广厦警务区重点人员</div>
      </div>
      <div @click="handleOpenPetitionDialog(5,'留守儿童')" class="background-number-item">
        <div class="value-block">
          <div class="value">{{LEFT_BEHIND_CHILDREN.length}}</div>
          <div class="unit">人</div>
        </div>
        <div class="text">留守儿童</div>
      </div>
      <div  @click="handleOpenPetitionDialog(6,'空巢老人')"  class="background-number-item">
        <div class="value-block">
          <div class="value">{{EMPTY_NESTERS.length}}</div>
          <div class="unit">人</div>
        </div>
        <div class="text">空巢老人</div>
      </div>
      <div class="background-number-item">
        <div class="value-block">
          <div class="value">0</div>
          <div class="unit">人</div>
        </div>
        <div class="text">上门女婿</div>
      </div>
      <div class="background-number-item">
        <div class="value-block">
          <div class="value">0</div>
          <div class="unit">人</div>
        </div>
        <div class="text">学经人员</div>
      </div>
    </div>
  </div>
</template>
<script>
import {
  SZQ_KEY_PERSONNEL_OF_LETTERS_AND_VISITS,
  SZQ_KEY_PERSONNEL_OF_GUANGXIA_POLICE,
  LEFT_BEHIND_CHILDREN, EMPTY_NESTERS,
  QS_KEY_PERSONNEL_OF_GUANGXIA_POLICE,
  INDUSTRY_SITES,
  PARTY_AND_GOVERNMENT_ORGANS,
  SCHOOL_DATA,
  OWNED_ENTERPRISE_UNIT,
  SZQ_KEY_PETITIONERS
} from "@/utils/data";

export default {
  name:'StationOverview',
  data(){
    return{
      SZQ_KEY_PERSONNEL_OF_LETTERS_AND_VISITS,
      SZQ_KEY_PERSONNEL_OF_GUANGXIA_POLICE,
      LEFT_BEHIND_CHILDREN,
      EMPTY_NESTERS,
      QS_KEY_PERSONNEL_OF_GUANGXIA_POLICE,
      INDUSTRY_SITES,
      PARTY_AND_GOVERNMENT_ORGANS,
      SCHOOL_DATA,
      OWNED_ENTERPRISE_UNIT,
      SZQ_KEY_PETITIONERS
    }
  },
  methods:{
    handleOpenPetitionDialog(type,title){
      this.$emit('openPetitionDialog', {type,title})
    },
  }
}
</script>
<style scoped lang="scss">
.station-overview{
  width: 100%;
  height: 100%;
  $textShadow:0px 1px 11px rgba(27, 126, 242, 0.8);
  .row{
    display: flex;
    justify-content: center;
    .number-item{
      width: 160px;
      height: 100px;
      display: flex;
      flex-direction: column;
      align-items: center;
      background: url("~@/assets/images/home-number-background.png") no-repeat center;
      background-size: 100% 100%;
      .value-block{
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 5px;
        .value{
          color: #fff;
          font-family: 冷酷体;
          text-shadow: $textShadow;
          font-weight: bold;
          font-size: 24px;
        }
        .unit{
          color: #fff;
          font-size: 14px;
          margin-left: 5px;
        }
      }
      .text{
        font-size: 14px;
        color: #fff;
      }
    }
  }
  .icon-number-block{
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    margin-bottom: 20px;
    margin-top: 0;
    .icon-number-item{
      width: calc(100%/3 - 10px);
      height: 80px;
      display: flex;
      align-items: center;
      .icon{
        width: 60px;
        margin-right: 20px;
      }
      .text-block{
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        height: 100%;
        padding: 17px 0;
        .text{
          font-size: 14px;
          color: #fff;
        }
        .value-block{
          display: flex;
          align-items: center;
          .value{
            font-family: 冷酷体;
            font-weight: bold;
            text-shadow: $textShadow;
            color: #fff;
            margin-right: 5px;
          }
          .unit{
            font-size: 14px;
            color: #fff;
          }
        }
      }
    }
  }
  .background-number-block{
    width: 100%;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    .background-number-item{
      width: calc(100%/4 - 15px);
      height: 100px;
      background: rgba(255, 255, 255, 0.05);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      margin-bottom: 10px;
      cursor: pointer;
      .value-block{
        display: flex;
        align-items: center;
        margin-bottom: 10px;
        .value{
          color: $fontColorSecondary;
          font-family: 冷酷体;
          font-size: 24px;
          font-weight: bold;
          margin-right: 10px;
        }
        .unit{
          color: #fff;
          font-size: 14px;
        }
      }
      .text{
        color: #fff;
        font-size: 14px;
      }
    }
    .background-number-item:nth-child(-n+4),{
      .text{
        font-size: 12px;
      }
    }
  }
}
</style>
